import { RedisCacheService } from '@app/redis-cache';
import { Injectable } from '@nestjs/common';
import { PrismaClient, makePageModel, autoTimestampAndUUIDExtension, Prisma } from '@repo/database';
@Injectable()
export class PrismaService {

  public readonly model = new PrismaClient().$extends(autoTimestampAndUUIDExtension).$extends({
    name: "pageExtension",
    model: makePageModel(async (where, user) => {
      // TODO 权限查询
      return where;
    })
  })
  constructor(
    // private readonly redisCacheService: RedisCacheService,
  ) { }
}